<template>
  <div class="sys-cell" @click="cellClick">
    <slot name="content">
      <div class="sys-cell-title">{{title}}</div>
      <div class="sys-cell-text">
        <slot></slot>
      </div>
    </slot>
  </div>
</template>

<script>
  export default {
    props: {
      title: {
        type: String,
        default: ''
      }
    },

    data() {
      return {};
    },

    methods:{
      cellClick(){
        this.$emit('click');
      }
    }
  };

</script>

<style lang="scss">
  .sys-cell {
    height: 40px;
    line-height: 40px;
    padding: 0 15px;
    background: #ffffff;

    &:active {
      background: #ECECEC;
    }

    >div {
      height: 100%;
    }

    .sys-cell-title {
      float: left;
    }

    .sys-cell-text {
      float: right;
    }
  }

</style>
